flowbox: Fix child item allocation
authorTimm Bäder <mail@baedert.org>
Wed, 10 May 2017 10:07:15 +0000 (12:07 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 25 May 2017 14:25:59 +0000 (16:25 +0200)
gtk/gtkflowbox.c

index 787318255a47d38e1c4533c1f9067c190cbcfe69..02440b27ac6a2ea855e4ef7ecf9e900c08254e95 100644 (file)
@@ -1830,15 +1830,15 @@ gtk_flow_box_allocate (GtkCssGadget        *gadget,
       /* Do the actual allocation */
       if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
         {
-          child_allocation.x = item_offset;
-          child_allocation.y = line_offset;
+          child_allocation.x = widget_allocation.x + item_offset;
+          child_allocation.y = widget_allocation.y + line_offset;
           child_allocation.width = this_item_size;
           child_allocation.height = this_line_size;
         }
       else /* GTK_ORIENTATION_VERTICAL */
         {
-          child_allocation.x = line_offset;
-          child_allocation.y = item_offset;
+          child_allocation.x = widget_allocation.x + line_offset;
+          child_allocation.y = widget_allocation.y + item_offset;
           child_allocation.width = this_line_size;
           child_allocation.height = this_item_size;
         }